package com.jkoss.wine.statistics.entity;

import cn.afterturn.easypoi.excel.annotation.Excel;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;

import java.io.Serializable;
import java.util.Date;


/**
 * 
 * 
 * @Author bg2it
 * @Version 1.0, 2019-08-12
 * @See
 * @Since com.jkoss.wine.statistics.entity
 * @Description: TODO
 */
public class Orders extends Model<Orders> {

    private static final long serialVersionUID = 1L;

    @TableId("order_id")
    private String orderId;
    /**
     * 订单号
     */
    @TableField("order_num")
    @Excel(name = "订单号",orderNum = "0")
    private String orderNum;
    /**
     * 订单流程  0新订单（未付款）1已受理   2待收货 6退款中 7已退货 8取消订单  9 完成
     */
    @TableField("order_process")
    @Excel(name = "订单状态",replace = {"新订单_0","已受理_1","待收货_2","退款中_6","已退货_7","取消订单_8","完成_9"},orderNum = "1")
    private Integer orderProcess;
    /**
     * 订单总额 即订单不算任何优惠的钱
     */
    @TableField("order_money")
    @Excel(name = "订单总额",orderNum = "2",numFormat = "0.0",type = 10)
    private Integer orderMoney;
    /**
     * 应收金额 扣除折扣以及优惠后的应收金额
     */
    @TableField("receivable_money")
    @Excel(name = "应收金额",orderNum = "3",numFormat = "0.0",type = 10)
    private Integer receivableMoney;
    /**
     * 实收金额 即收银员实际收取的金额
     */
    @TableField("real_money")
    @Excel(name = "实收金额",orderNum = "4",numFormat = "0.0",type = 10)
    private Integer realMoney;
    /**
     * 活动减免金额  (只会参加一个营销活动)
     */
    @TableField("activity_reduce_money")
    @Excel(name = "活动减免金额",orderNum = "5",numFormat = "0.0",type = 10)
    private Integer activityReduceMoney;
    @TableField("activity_id")
    private String activityId;
    /**
     * 订单折扣
     */
    @TableField("order_discount")
    @Excel(name = "订单折扣",orderNum = "7",suffix = "%")
    private Integer orderDiscount;
    /**
     * 支付时间
     */
    @TableField("pay_time")
    @Excel(name = "支付时间",orderNum = "8",format="yyyy-MM-dd HH:mm:ss")
    private Date payTime;
    /**
     * 完成时间
     */
    @TableField("complete_time")
    private Date completeTime;
    /**
     * 联系人
     */
    @TableField("link_man")
    private String linkMan;
    /**
     * 联系人电话
     */
    @TableField("contact_phone")
    private String contactPhone;
    /**
     * 联系人地址
     */
    @TableField("contact_address")
    private String contactAddress;
    /**
     * 快递费
     */
    @TableField("postage_price")
    private Integer postagePrice;
    /**
     * 会员id
     */
    @TableField("member_id")
    private String memberId;
    /**
     * 备注
     */
    @TableField("memo")
    private String memo;
    /**
     * 评论状态 0未评论 1已评论
     */
    @TableField("evaluation_state")
    private Integer evaluationState;
    /**
     * 退货原因  退货才会有值
     */
    @TableField("reason")
    private String reason;
    /**
     * 导购员
     */
    @TableField("guider")
    private String guider;
    /**
     * 0:充值  1:扣费
     */
    @TableField("order_type")
    private Integer orderType;
    /**
     * 店铺ID
     */
    @TableField("shop_id")
    private String shopId;
    /**
     * 生成订单的IP
     */
    @TableField("client_ip")
    private String clientIp;
    @TableField("operator")
    private String operator;
    @TableField("add_time")
    private Date addTime;
    @TableField("del")
    private Integer del;
    /**
     * 如果是充值会有值
     */
    @TableField("card_recharge_id")
    private String cardRechargeId;
    /**
     * 卡ID 如果业务有值则传  没有则为null
     */
    @TableField("card_id")
    private String cardId;
    /**
     * 收取客人的金额
     */
    @TableField("get_money")
    private Integer getMoney;
    /**
     * 赠送金额 结账后 赠送到会员会员卡中  非会员必为0
     */
    @TableField("giving_money")
    private Integer givingMoney;
    /**
     * 找零金额  收取金额getmoney - 订单结账金额realmoney   支付方式为现金支付时才有值
     */
    @TableField("odd_change_money")
    private Integer oddChangeMoney;


    public String getOrderId() {
        return orderId;
    }

    public void setOrderId(String orderId) {
        this.orderId = orderId;
    }

    public String getOrderNum() {
        return orderNum;
    }

    public void setOrderNum(String orderNum) {
        this.orderNum = orderNum;
    }

    public Integer getOrderProcess() {
        return orderProcess;
    }

    public void setOrderProcess(Integer orderProcess) {
        this.orderProcess = orderProcess;
    }

    public Integer getOrderMoney() {
        return orderMoney;
    }

    public void setOrderMoney(Integer orderMoney) {
        this.orderMoney = orderMoney;
    }

    public Integer getReceivableMoney() {
        return receivableMoney;
    }

    public void setReceivableMoney(Integer receivableMoney) {
        this.receivableMoney = receivableMoney;
    }

    public Integer getRealMoney() {
        return realMoney;
    }

    public void setRealMoney(Integer realMoney) {
        this.realMoney = realMoney;
    }

    public Integer getActivityReduceMoney() {
        return activityReduceMoney;
    }

    public void setActivityReduceMoney(Integer activityReduceMoney) {
        this.activityReduceMoney = activityReduceMoney;
    }

    public String getActivityId() {
        return activityId;
    }

    public void setActivityId(String activityId) {
        this.activityId = activityId;
    }

    public Integer getOrderDiscount() {
        return orderDiscount;
    }

    public void setOrderDiscount(Integer orderDiscount) {
        this.orderDiscount = orderDiscount;
    }

    public Date getPayTime() {
        return payTime;
    }

    public void setPayTime(Date payTime) {
        this.payTime = payTime;
    }

    public Date getCompleteTime() {
        return completeTime;
    }

    public void setCompleteTime(Date completeTime) {
        this.completeTime = completeTime;
    }

    public String getLinkMan() {
        return linkMan;
    }

    public void setLinkMan(String linkMan) {
        this.linkMan = linkMan;
    }

    public String getContactPhone() {
        return contactPhone;
    }

    public void setContactPhone(String contactPhone) {
        this.contactPhone = contactPhone;
    }

    public String getContactAddress() {
        return contactAddress;
    }

    public void setContactAddress(String contactAddress) {
        this.contactAddress = contactAddress;
    }

    public Integer getPostagePrice() {
        return postagePrice;
    }

    public void setPostagePrice(Integer postagePrice) {
        this.postagePrice = postagePrice;
    }

    public String getMemberId() {
        return memberId;
    }

    public void setMemberId(String memberId) {
        this.memberId = memberId;
    }

    public String getMemo() {
        return memo;
    }

    public void setMemo(String memo) {
        this.memo = memo;
    }

    public Integer getEvaluationState() {
        return evaluationState;
    }

    public void setEvaluationState(Integer evaluationState) {
        this.evaluationState = evaluationState;
    }

    public String getReason() {
        return reason;
    }

    public void setReason(String reason) {
        this.reason = reason;
    }

    public String getGuider() {
        return guider;
    }

    public void setGuider(String guider) {
        this.guider = guider;
    }

    public Integer getOrderType() {
        return orderType;
    }

    public void setOrderType(Integer orderType) {
        this.orderType = orderType;
    }

    public String getShopId() {
        return shopId;
    }

    public void setShopId(String shopId) {
        this.shopId = shopId;
    }

    public String getClientIp() {
        return clientIp;
    }

    public void setClientIp(String clientIp) {
        this.clientIp = clientIp;
    }

    public String getOperator() {
        return operator;
    }

    public void setOperator(String operator) {
        this.operator = operator;
    }

    public Date getAddTime() {
        return addTime;
    }

    public void setAddTime(Date addTime) {
        this.addTime = addTime;
    }

    public Integer getDel() {
        return del;
    }

    public void setDel(Integer del) {
        this.del = del;
    }

    public String getCardRechargeId() {
        return cardRechargeId;
    }

    public void setCardRechargeId(String cardRechargeId) {
        this.cardRechargeId = cardRechargeId;
    }

    public String getCardId() {
        return cardId;
    }

    public void setCardId(String cardId) {
        this.cardId = cardId;
    }

    public Integer getGetMoney() {
        return getMoney;
    }

    public void setGetMoney(Integer getMoney) {
        this.getMoney = getMoney;
    }

    public Integer getGivingMoney() {
        return givingMoney;
    }

    public void setGivingMoney(Integer givingMoney) {
        this.givingMoney = givingMoney;
    }

    public Integer getOddChangeMoney() {
        return oddChangeMoney;
    }

    public void setOddChangeMoney(Integer oddChangeMoney) {
        this.oddChangeMoney = oddChangeMoney;
    }

    @Override
    protected Serializable pkVal() {
        return this.orderId;
    }

    @Override
    public String toString() {
        return "Orders{" +
        ", orderId=" + orderId +
        ", orderNum=" + orderNum +
        ", orderProcess=" + orderProcess +
        ", orderMoney=" + orderMoney +
        ", receivableMoney=" + receivableMoney +
        ", realMoney=" + realMoney +
        ", activityReduceMoney=" + activityReduceMoney +
        ", activityId=" + activityId +
        ", orderDiscount=" + orderDiscount +
        ", payTime=" + payTime +
        ", completeTime=" + completeTime +
        ", linkMan=" + linkMan +
        ", contactPhone=" + contactPhone +
        ", contactAddress=" + contactAddress +
        ", postagePrice=" + postagePrice +
        ", memberId=" + memberId +
        ", memo=" + memo +
        ", evaluationState=" + evaluationState +
        ", reason=" + reason +
        ", guider=" + guider +
        ", orderType=" + orderType +
        ", shopId=" + shopId +
        ", clientIp=" + clientIp +
        ", operator=" + operator +
        ", addTime=" + addTime +
        ", del=" + del +
        ", cardRechargeId=" + cardRechargeId +
        ", cardId=" + cardId +
        ", getMoney=" + getMoney +
        ", givingMoney=" + givingMoney +
        ", oddChangeMoney=" + oddChangeMoney +
        "}";
    }
}
